<%= render(:partial => "shared/flash_message") %>
<%= render :partial => "shared/config_save_actions" -%>
<%= form_for(scope[:task], :as => :task, :url => scope[:url], :html => {"novalidate"=> "novalidate", :id=> "task_form", :name=> "task_form", :method => scope[:method], :onsubmit => "return AjaxForm.jquery_ajax_submit(this);", :class => "popup_form"}) do |f| %>
    <%= md5_field %>
    <%= hidden_field_tag :pipeline_digest, @pipeline_digest %>
    <%= hidden_field_tag :pipeline_group_name, @pipeline_group_name %>
    <%= hidden_field_tag :pipeline_name, @pipeline.name %>
    <div class="form_content exec_task_editor">
        <%= render :partial => "admin/shared/global_errors.html", :locals => {:scope => {}} -%>
        <h3>Basic Settings</h3>
        <div id="task">
            <div class="task fieldset">
                <%== render_pluggable_form_template(scope[:tvm], form_name_provider(f), { :scope => {:task => scope[:task], :form => f}}) -%>
                <% unless scope[:hide_runif] %>
                    <div class="form_item required">
                        <%= render :partial => "admin/tasks/runif.html", :locals => {:scope => {:form => f, :on_cancel => false, :run_if => true, :runif_container => random_dom_id('run_if_options_')}} %>
                    </div>
                <% end %>
                <%= render :partial => 'shared/form_required_message.html', :locals => {:scope => {}} %>
            </div>
            <h3>Advanced Options</h3>
            <%= render :partial => "admin/tasks/on_cancel.html", :locals => {:scope => {:task => @task, :form => f, :config_store => scope[:config_store]}} %>
        </div>
    </div>
  <% if @is_config_repo_pipeline %>
    <div class="primary finish submit" style="display: none"></div>
  <% else %>
    <%= render :partial => "shared/form_buttons.html", :locals => {:scope => {:submit_label => 'SAVE'}} %>
  <% end %>
    <%= render :partial => 'shared/convert_tool_tips.html' %>
<% end %>

<script type="text/javascript">
    jQuery(document).ready(function () {
        new TaskPluginView().bootstrapAngular();
        if (<%= @is_config_repo_pipeline || false %>) {
          Util.disableAllFormElementsFor('.exec_task_editor');
        }
    });
</script>

